<?php

class FacadeActionControllerPage extends AbstractActionController  
{
    var $actionControllerPage; 
    
    function FacadeActionControllerPage($newPage, $newAction)
    {
        if (file_exists(Barakus::getPath(Config::get("controller_dir_real") . "." . $newPage) . ".php"))
        {
            Barakus::import(Config::get("controller_dir_real") . "." . $newPage);
        }
        
        if (class_exists($newPage))
        {
            $actionControllerPage = new ActionControllerDynamicPage($newPage, $newAction);    
        }
        elseif (file_exists(Barakus::getPath(Config::get("views_dir_real") . "." . $newPage) . "." .Config::get('view_extension')))
        {
            $actionControllerPage = new ActionControllerEstaticPage($newPage);
        }
        else
        {
            Error::ClassNotExists($clase);  
        }
    }
     
    function execute()
    {    
        $this->actionControllerPage->execute();
    }  
    
}

?>
